<?php


namespace app\manage\controller;

use app\common\model\CustomerService as CustomerServiceModel;
class CustomerService extends Base
{
    public function index(){
        $info = CustomerServiceModel::get(1);
        return view('/customer_service_index',[
            'info' => $info
        ]);
    }
    public function savePhone(){
        $customer_service_phone = input('customer_service_phone');
        $data = CustomerServiceModel::get(1);
        if (empty($data)){
            $data = new CustomerServiceModel();
        }
        $data->customer_service_phone = $customer_service_phone;
        if ($data->save()){
            return j(0,'操作成功');
        }
        return  j(1,'操作失败');
    }
}